Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2] Controller Entrypoint #873

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Conversation

ian-shim
Copy link
Contributor

@ian-shim ian-shim commented Nov 8, 2024

Why are these changes needed?

Adds an entrypoint to controller that kicks off encoding manager and dispatcher.
TODO: dependency to encoding client to be resolved in follow up PR when #866 is merged

Checks

  • I've made sure the lint is passing in this PR.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • I've checked the new test coverage and the coverage percentage didn't drop.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@ian-shim
Copy link
Contributor Author

ian-shim commented Nov 8, 2024

To be rebased on top of #871

@ian-shim ian-shim requested review from anupsv and dmanc November 8, 2024 00:50
@ian-shim ian-shim marked this pull request as ready for review November 8, 2024 00:50
Copy link
Contributor

@dmanc dmanc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm so far, left a couple comments

disperser/cmd/controller/config.go Outdated Show resolved Hide resolved
disperser/cmd/controller/config.go Outdated Show resolved Hide resolved
disperser/cmd/controller/flags/flags.go Outdated Show resolved Hide resolved
Name: common.PrefixFlag(FlagPrefix, "available-relays"),
Usage: "List of available relays",
Required: true,
EnvVar: common.PrefixEnvVar(envVarPrefix, "AVAILABLE_RELAYS"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work? Each relay has a integer assigned to it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this will be a list of integer representing the disperser's relay keys

}
NodeClientCacheSizeFlag = cli.IntFlag{
Name: common.PrefixFlag(FlagPrefix, "node-client-cache-size"),
Usage: "Size of the node client cache",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the unit of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Number of entries. Updated the name accordingly

@ian-shim ian-shim force-pushed the v2-controller branch 2 times, most recently from a8bc74f to 9f2a652 Compare November 11, 2024 17:59
Copy link
Collaborator

@mooselumph mooselumph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will approve after rebase.

dispatcherPool := workerpool.New(config.NumConcurrentDispersalRequests)
chainState := eth.NewChainState(chainReader, gethClient)
var ics core.IndexedChainState
if config.UseGraph {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the intention behind retaining the built-in indexer? Is this for testing purposes? Can we safely remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is to support testing mode that doesn't use graph indexer.
I kept it because non-graph e2e tests have been useful few times in the past

@ian-shim ian-shim merged commit 94ab42f into Layr-Labs:master Nov 13, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants